﻿/* ----------------------------------------------------------------------------
 * Copyright (c) Philip Stears 
 *
 * This source code is subject to terms and conditions of the Microsoft Public 
 * License (Ms-PL).
 * 
 * By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 * 
 * To request a copy of the Microsoft Public License, send a request by email
 * to license@connectbasic.net.
 *
 * This notice must not be removed from this software.
 * ---------------------------------------------------------------------------- */

using System;
namespace ConnectBasic.Shell.Extensibility
{

    /// <summary>
    /// Provides support for retrieving information about an executable macro and executing it.
    /// </summary>
    public interface IExecutableMacro
    {

        /// <summary>
        /// Raised when the macro starts (may be on a separate thread).
        /// </summary>
        event EventHandler Started;

        /// <summary>
        /// Raised when the macro finishes (may be on a separate thread).
        /// </summary>
        event EventHandler Finished;
        
        /// <summary>
        /// Gets the name of the macro.
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Executes the macro.
        /// </summary>
        void Execute();
    }
}
